import request from '../utils/request'

export function queryBlogById(id) {
  let data = {
    id: id
  }
  return request({
    url: '/blog/queryBlogById',
    method: 'get',
    params: data
  })
}

// 查询博客列表
//Integer page 页数
//Integer size 大小
export function queryAllBlogByLimit(query) {
  return request({
    url: '/blog/queryAllByLimit',
    method: 'get',
    params: query
  })
}

// 根据查询条件查询博客列表
//Integer page 页数
//Integer size 大小
export function queryAllBlogByBlogAndLimit(data) {
  return request({
    url: '/blog/queryAllByBlogAndLimit',
    method: 'post',
    data: data
  })
}

// 新增博客
export function saveBlog(data) {
  return request({
    url: '/blog/saveBlog',
    method: 'post',
    data: data
  })
}

// 更新博客
export function updateBlog(data) {
  return request({
    url: '/blog/updateBlog',
    method: 'post',
    data: data
  })
}

// 删除博客
export function deleteBlogById(query) {
  return request({
    url: '/blog/deleteBlogById',
    method: 'get',
    params: query
  })
}

